{extend name="public:base"/}
{block name="main"}

<form class="layui-form" action="" method="POST">
        <div class="layui-form-item">
          <label class="layui-form-label">链接名称</label>
          <div class="layui-input-inline" style="width:350px;">
            <input type="hidden" name="linkid" value="{$info['linkid']}">
            <input type="text" name="name" required lay-verify="required" placeholder="链接名称" autocomplete="off" class="layui-input"  value="{$info['name']}">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">链接地址</label>
          <div class="layui-input-inline" style="width:350px;">
            <input type="text" name="link" required lay-verify="required"  placeholder="链接跳转地址" autocomplete="off" class="layui-input"  value="{$info['link']}">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">排序</label>
          <div class="layui-input-inline" style="width:350px;">
            <input type="text" name="px"  placeholder="排序" autocomplete="off" class="layui-input"  value="{$info['px']}">
          </div>
        </div>
        
        <div class="layui-form-item">
          <label class="layui-form-label">状态</label>
          <div class="layui-input-block">
            <input type="checkbox" name="status" lay-skin="switch" lay-text="启用|禁用" lay-filter="switchTest" value="1" {if condition="($info['status'] eq '1') OR ($info['status'] eq '')"}checked=''{/if}>
            <div class="layui-unselect layui-form-switch" lay-skin="_switch">
            	<em>OFF</em><i></i>
            </div>
          </div>
        </div>
        <div class="layui-form-item">
          <div class="layui-input-block">
            <button class="layui-btn" lay-submit="" lay-filter="formDemo">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
          </div>
        </div>
</form>

<script type="text/javascript">
	layui.use(['form','layedit','upload'], function(){
	  var form = layui.form;
     //上传
    
	 
	  form.verify({
	    title: function(value){
	      if(value.length < 5){
	        return '至少得1个字符啊';
	      }
	    }
	    
	  });
	});
</script>
<script>
/*$(function () {
   
    var um = UM.getEditor('myEditors');
});*/
</script>

{/block}